import React, { Component } from 'react'
import RouterView from "../router/routerView"
import RouterList from "../router/routerList"
import {BrowserRouter,HashRouter} from "react-router-dom" // 5版本的，broswerRouter和hsahRouter这两个标签一个项目只能出现一次
// 
 class App extends Component {
   state = {
     mode:"history"
   }
  render() {
    return (
      <div>
        {
          this.state.mode == "history"?
          <BrowserRouter>
                <RouterView RouterList={RouterList}></RouterView>
          </BrowserRouter>:
          <HashRouter>
                <RouterView RouterList={RouterList}></RouterView>
          </HashRouter>
        }
         
      </div>
    )
  }
}

export default App